import Vue from 'vue'

// UI Library
import cui from '@cci/cui'
import './lazyUse'
import directive from '../directive/directive' // 使用自定义指令
// Lib Library
// import cm from '@cm/cm-lib'
import { Storage } from '@cm/cm-lib'

// icons
import '@/icons'

// directive
import '@/directive/index'
import '@cci/theme-ant-design/src/index.scss'

import '@cci/cp-theme-default/src/index.scss'
// 自定义指令

// 全局组件
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts

Vue.use(Viewer)
Vue.prototype.$storage = new Storage('sessionStorage', 'dg-refine-web')
window.$storage = new Storage('sessionStorage', 'dg-refine-web')
// 字符串转html  替换v-html
Vue.directive('exchangeHtml', {
  bind: function (el, foo) {
    el.innerHTML += foo.value
  }
})

Vue.use(cui)
Vue.use(directive)
